<script setup lang="ts">
import Tree from "./Tree.vue";
import {reactive} from "vue";

interface Tree {
  name: string,
  checked: boolean,
  children?: Tree[]
}

const data = reactive<Tree[]>([
  {
    name: '1',
    checked: false,
    children: [
      {
        name: '1-1',
        checked: false
      }
    ]
  },
  {
    name: '2',
    checked: false,
    children: [
      {
        name: '2-2',
        checked: false,
        children: [
          {
            name: '2-2-2',
            checked: false
          }
        ]
      }
    ]
  },
  {
    name: '3',
    checked: false
  },
])
</script>

<template>
  <Tree :data="data"/>
</template>

<style scoped lang="scss">

</style>